import time

from playwright.sync_api import sync_playwright

with sync_playwright() as p:
    browser = p.chromium.launch(headless=False)
    page = browser.new_page()
    page.goto("https://team.pescms.com/?g=Team&m=Login&a=index&back_url=Lw==")

    # 定位元素并操作
    account_input = page.locator("input[name='account']")
    account_input.fill("2333")

    password_input = page.locator("input[name='passwd']")
    password_input.fill("1555523")

    login_button = page.locator("button:has-text('登录')")
    login_button.click()
    time.sleep(5)

    browser.close()